home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1996 #15
/
Monster Media Number 15 (Monster Media)(July 1996).ISO
/
prog_bas
/
vbcolor3.zip
/
COLORS.FRM
< prev
next >
Wrap
Text File
|
1996-04-17
|
11KB
|
344 lines
VERSION 4.00
Begin VB.Form frmColor
AutoRedraw = -1 'True
BorderStyle = 1 'Fixed Single
Caption = "VBColor32"
ClientHeight = 4035
ClientLeft = 1860
ClientTop = 1515
ClientWidth = 2910
BeginProperty Font
name = "MS Sans Serif"
charset = 0
weight = 700
size = 8.25
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
ForeColor = &H80000008&
Height = 4440
Icon = "COLORS.frx":0000
Left = 1800
LinkMode = 1 'Source
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 4035
ScaleWidth = 2910
Top = 1170
Width = 3030
Begin VB.CommandButton cmdExit
Caption = "Exit"
Height = 375
Left = 1680
TabIndex = 17
Top = 1560
Width = 735
End
Begin VB.CommandButton cmdAbout
Caption = "About"
Default = -1 'True
Height = 375
Left = 480
TabIndex = 16
Top = 1560
Width = 735
End
Begin VB.PictureBox picBlue
BackColor = &H00FFFFFF&
Height = 255
Left = 2520
ScaleHeight = 195
ScaleWidth = 195
TabIndex = 5
Top = 480
Width = 255
End
Begin VB.PictureBox picGreen
BackColor = &H00FFFFFF&
Height = 255
Left = 1320
ScaleHeight = 195
ScaleWidth = 195
TabIndex = 4
Top = 480
Width = 255
End
Begin VB.PictureBox picRed
BackColor = &H00FFFFFF&
Height = 255
Left = 120
ScaleHeight = 195
ScaleWidth = 195
TabIndex = 3
Top = 480
Width = 255
End
Begin VB.TextBox txtDirect
BackColor = &H00C0C0C0&
BorderStyle = 0 'None
BeginProperty Font
name = "System"
charset = 0
weight = 700
size = 9.75
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
Height = 252
Left = 840
TabIndex = 14
Top = 3720
Width = 2172
End
Begin VB.TextBox txtRgb
BackColor = &H00C0C0C0&
BorderStyle = 0 'None
BeginProperty Font
name = "System"
charset = 0
weight = 700
size = 9.75
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
Height = 255
Left = 120
TabIndex = 10
Top = 3360
Width = 2415
End
Begin VB.VScrollBar vsbBlue
Height = 1812
Left = 2520
Max = 255
TabIndex = 2
Top = 1080
Width = 252
End
Begin VB.VScrollBar vsbGreen
Height = 1812
Left = 1320
Max = 255
TabIndex = 1
Top = 1080
Width = 252
End
Begin VB.VScrollBar vsbRed
Height = 1812
Left = 120
Max = 255
TabIndex = 0
Top = 1080
Width = 252
End
Begin VB.TextBox txtBlue
BackColor = &H00C0C0C0&
BorderStyle = 0 'None
BeginProperty Font
name = "System"
charset = 0
weight = 700
size = 9.75
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
Height = 252
Left = 2520
TabIndex = 13
Top = 840
Width = 372
End
Begin VB.TextBox txtGreen
BackColor = &H00C0C0C0&
BorderStyle = 0 'None
BeginProperty Font
name = "System"
charset = 0
weight = 700
size = 9.75
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
Height = 252
Left = 1320
TabIndex = 12
Top = 840
Width = 372
End
Begin VB.TextBox txtRed
BackColor = &H00C0C0C0&
BorderStyle = 0 'None
BeginProperty Font
name = "System"
charset = 0
weight = 700
size = 9.75
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
Height = 252
Left = 120
TabIndex = 11
Top = 720
Width = 372
End
Begin VB.PictureBox picAll
BackColor = &H00FFFFFF&
Height = 375
Left = 120
ScaleHeight = 315
ScaleWidth = 2595
TabIndex = 6
Top = 0
Width = 2655
End
Begin VB.Label lblBlue
AutoSize = -1 'True
BackColor = &H00808080&
BackStyle = 0 'Transparent
Caption = "Blue"
BeginProperty Font
name = "System"
charset = 0
weight = 700
size = 9.75
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
ForeColor = &H00C00000&
Height = 240
Left = 2400
TabIndex = 9
Top = 3000
Width = 450
End
Begin VB.Label lblGreen
AutoSize = -1 'True
BackColor = &H00808080&
BackStyle = 0 'Transparent
Caption = "Green"
BeginProperty Font
name = "System"
charset = 0
weight = 700
size = 9.75
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
ForeColor = &H0000C000&
Height = 240
Left = 1200
TabIndex = 8
Top = 3000
Width = 585
End
Begin VB.Label lblRed
AutoSize = -1 'True
BackColor = &H00808080&
BackStyle = 0 'Transparent
Caption = "Red"
BeginProperty Font
name = "System"
charset = 0
weight = 700
size = 9.75
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
ForeColor = &H000000C0&
Height = 240
Left = 120
TabIndex = 7
Top = 3000
Width = 390
End
Begin VB.Label lblDirect
AutoSize = -1 'True
BackColor = &H00808080&
BackStyle = 0 'Transparent
Caption = "Direct:"
BeginProperty Font
name = "System"
charset = 0
weight = 700
size = 9.75
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
Height = 240
Left = 120
TabIndex = 15
Top = 3720
Width = 630
End
End
Attribute VB_Name = "frmColor"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
Private Sub cmdAbout_Click()
frmAbout.Show
End Sub
Private Sub cmdExit_Click()
End
End Sub
Private Sub Form_Load()
picRed.BackColor = RGB(255, 0, 0)
picGreen.BackColor = RGB(0, 255, 0)
picBlue.BackColor = RGB(0, 0, 255)
txtRed.Text = "FF"
txtGreen.Text = "FF"
txtBlue.Text = "FF"
txtRgb.Text = "RGB(&HFF, &HFF, &HFF)"
txtDirect.Text = "&HFFFFFF"
End Sub
Private Sub vsbBlue_Change()
txtBlue.Text = Hex$(255 - vsbBlue.Value)
If vsbRed.Value = 255 Then ColorVal1$ = "0" Else ColorVal1$ = txtRed.Text
If vsbGreen.Value = 255 Then ColorVal2$ = "0" Else ColorVal2$ = txtGreen.Text
If vsbBlue.Value = 255 Then ColorVal3$ = "0" Else ColorVal3$ = txtBlue.Text
txtRgb.Text = "RGB(&H" + ColorVal1$ + ", &H" + ColorVal2$ + ", &H" + ColorVal3$ + ")"
txtDirect.Text = "&H" + ColorVal3$ + ColorVal2$ + ColorVal1$
picBlue.BackColor = RGB(0, 0, 255 - vsbBlue.Value)
picAll.BackColor = RGB(255 - vsbRed.Value, 255 - vsbGreen.Value, 255 - vsbBlue.Value)
End Sub
Private Sub vsbGreen_Change()
txtGreen.Text = Hex$(255 - vsbGreen.Value)
If vsbRed.Value = 255 Then ColorVal1$ = "0" Else ColorVal1$ = txtRed.Text
If vsbGreen.Value = 255 Then ColorVal2$ = "0" Else ColorVal2$ = txtGreen.Text
If vsbBlue.Value = 255 Then ColorVal3$ = "0" Else ColorVal3$ = txtBlue.Text
txtRgb.Text = "RGB(&H" + ColorVal1$ + ", &H" + ColorVal2$ + ", &H" + ColorVal3$ + ")"
txtDirect.Text = "&H" + ColorVal3$ + ColorVal2$ + ColorVal1$
picGreen.BackColor = RGB(0, 255 - vsbGreen.Value, 0)
picAll.BackColor = RGB(255 - vsbRed.Value, 255 - vsbGreen.Value, 255 - vsbBlue.Value)
End Sub
Private Sub vsbRed_Change()
txtRed.Text = Hex$(255 - vsbRed.Value)
If vsbRed.Value = 255 Then ColorVal1$ = "0" Else ColorVal1$ = txtRed.Text
If vsbGreen.Value = 255 Then ColorVal2$ = "0" Else ColorVal2$ = txtGreen.Text
If vsbBlue.Value = 255 Then ColorVal3$ = "0" Else ColorVal3$ = txtBlue.Text
txtRgb.Text = "RGB(&H" + ColorVal1$ + ", &H" + ColorVal2$ + ", &H" + ColorVal3$ + ")"
txtDirect.Text = "&H" + ColorVal3$ + ColorVal2$ + ColorVal1$
picRed.BackColor = RGB(255 - vsbRed.Value, 0, 0)
picAll.BackColor = RGB(255 - vsbRed.Value, 255 - vsbGreen.Value, 255 - vsbBlue.Value)
End Sub